﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Practices.Unity;
using Microsoft.Practices.Prism.Regions;
using ShellInfrastructure;
using ModuleProduct.Views;
using Microsoft.Practices.ServiceLocation;
using ModuleProduct.ViewModels;

namespace ModuleProduct
{
    public class ProductModule : ModulesInfrastructure.SharedModule
    {
        protected override void RegisterViewsInRegions()
        {
            RegionManager.RegisterViewWithRegion(RegionNames.LeftRegionName, () => UnityContainer.Resolve<IProductViewList>());
        }

        protected override void RegisterTypesDependencies()
        {
            UnityContainer.RegisterType<IProductViewList, ProducViewList>(new ContainerControlledLifetimeManager());
            UnityContainer.RegisterType<IProductViewModel, ProductViewModel>(new ContainerControlledLifetimeManager());
        }
    }
}
